<fieldset id="fd1" style="width:95%;margin:5px;">
	<legend><span>工单信息查询</span></legend>
	<div class="fieldset-body">
		<table class="form-table" border="0" cellpadding="1" cellspacing="2">
			<tr>
				<td class="form-label" style="width:120px;">工单编号:</td>
				<td style="width:120px"><input id="order_no" class="mini-textbox" emptyText="请输入工单编号" style="width:100%;"/></td>
				<td class="form-label" style="width:120px;">售后单编号:</td>
				<td style="width:120px"><input id="order_id" class="mini-textbox" emptyText="请输入售后单编号" style="width:100%;"/></td>
				<td class="form-label" style="width:80px;">工单类型:</td>
				<td style="width:120px"><input id="types" class="mini-combobox" textField="name" valueField="id" data="JS.CONST[5]" allowInput="true" style="width:100%;" /></td>
				<td class="form-label" style="width:120px;">派工组织机构:</td>
				<td style="width:120px"><input id="disagency" expandOnLoad="true" class="mini-treeselect" url="/common/agencyOne" multiSelect="false" textField="name" valueField="id" parentField="parent" checkRecursive="true" showFolderCheckBox="true" style="width:100%;"/></td>
				<td style="width:80px;">&nbsp</td>
				<td style="width:150px">&nbsp</td>
			</tr>
			<tr>
				<td class="form-label" style="width:120px;">施工组织机构:</td>
				<td style="width:120px"><input id="conagency" expandOnLoad="true" class="mini-treeselect" url="/common/agencyOne" multiSelect="false" textField="name" valueField="id" parentField="parent" checkRecursive="true" showFolderCheckBox="true" style="width:100%;"/></td>
				<td class="form-label" style="width:80px;">创建时间:</td>
				<td style="width:120px"><input id="createdStart" class="mini-datepicker" value="" style="width:100%"/></td>
				<td class="form-label" style="width:80px;">～</td>
				<td style="width:120px"><input id="createdEnd" class="mini-datepicker" value="" style="width:100%"/></td>
				<td class="form-label" style="width:80px;">工单状态:</td>
				<td style="width:120px"><input id="statuss" class="mini-combobox" textField="name" valueField="id" data="JS.CONST[6]" allowInput="true" style="width:100%;" /></td>
				<td style="width:80px;">&nbsp</td>
				<td style="width:150px"><a class="mini-button" id="search" iconCls="icon-search">查询...</a></td>
			</tr>
		</table>
	</div>
</fieldset>
<div class="mini-toolbar" style="padding:0px;margin:6px 0px 0px 0px;border-bottom:0;width:100%;">
	<table style="width:100%;">
		<tr>
			<td style="width:100%;">
				<a class="mini-button" iconCls="icon-search" onClick="BusinessInfo2('id')" plain="true">查看工单详情</a>
				<span class="separator"></span>
				<a class="mini-button" iconCls="icon-search" onClick="CustomerInfo('customer_id')" plain="true">查看顾客详情</a>
				<span class="separator"></span>
			</td>
		</tr>
	</table>
</div>
<div id="grid1" class="mini-datagrid" allowAlternating="true" frozenStartColumn="0" frozenEndColumn="5" idField="id" pageSize="20" style="width:100%;height:73%;" url="/business/historyList" >
	<div property="columns">
		<div type="checkcolumn" headerAlign="center">选择</div>
		<div field="id" width="80" headerAlign="center" align="center" allowSort="true">工单编号</div>
		<div field="typename" width="80" allowSort="true">工单类型</div>
		<div field="order_id" width="80">备用编号</div>
		<div field="title" width="120">标题</div>
		<div field="statusname" width="90" headerAlign="center" align="center" allowSort="true">状态</div>
		<div field="customer" width="80">顾客名</div>
		<div header="工单详情" headerAlign="center">
			<div property="columns">
				<div field="content" width="150">详细内容</div>
				<div field="discuss" width="80">业务员</div>
				<div field="business_name" width="110" headerAlign="center">创建人(顾客/客服)</div>
				<div field="created" width="140" headerAlign="center" align="center" dateFormat="yyyy-MM-dd HH:mm:ss">创建时间</div>
			</div>
		</div>
		<div header="派工信息" name="aaa" headerAlign="center">
			<div property="columns">
				<div field="dis_agency" width="100">派工组织机构</div>
				<div field="dis_staff" width="80">派工人员</div>
				<div header="派工计划" headerAlign="center">
					<div property="columns">
						<div field="plan_start" width="140" headerAlign="center" align="center" dateFormat="yyyy-MM-dd HH:mm:ss">计划开始时间</div>
						<div field="plan_end" width="140" headerAlign="center" align="center" dateFormat="yyyy-MM-dd HH:mm:ss">计划开始时间</div>
						<div field="plan_work_time" width="60">计划工时</div>
					</div>
				</div>
			</div>
		</div>
		<div header="施工信息" name="bbb" headerAlign="center">
			<div property="columns">
				<div field="con_agency" width="100">施工组织机构</div>
				<div field="con_staff" width="80">施工人员</div>
				<div header="施工计划" headerAlign="center">
					<div property="columns">
						<div field="actual_start" width="140" headerAlign="center" align="center" dateFormat="yyyy-MM-dd HH:mm:ss">实际开始时间</div>
						<div field="actual_end" width="140" headerAlign="center" align="center" dateFormat="yyyy-MM-dd HH:mm:ss">实际开始时间</div>
						<div field="actua_work_time" width="60" headerAlign="center" align="center">实际工时</div>
					</div>
				</div>
			</div>
		</div>
		<div header="评价信息" headerAlign="center">
			<div property="columns">
				<div field="evaluate" width="40" headerAlign="center" align="center">等分</div>
				<div field="evaluate_content" width="130" headerAlign="center">内容</div>
				<div field="evaluate_time" width="80" headerAlign="center" align="center" dateFormat="yyyy-MM-dd">评价时间</div>
			</div>
		</div>
		<div field="remark" width="160" headerAlign="center">备注<input property="editor" class="mini-textarea" emptyText="请输入备注" style="width:100%;height:80px;"/></div>
	</div>
</div>
<iframe id="exportIFrame" style="display:none;"></iframe>
<script type="text/javascript">
mini.parse();
var urlDel = "/business/dispatchingDel";
var urlUpd = "/business/dispatchingUpd";
var grid = mini.get("grid1");
grid.load();

// 查询
$("#search").click(function(){
	grid.load({
			order_no:mini.get("order_no").getValue(),
    		order_id:mini.get("order_id").getValue(),
			types:mini.get("types").getValue(),
			dis_agency_id:mini.get("disagency").getValue(),
			con_agency_id:mini.get("conagency").getValue(),
			created_start:mini.get("createdStart").getText(),
			created_end:mini.get("createdEnd").getText(),
			statuss:mini.get("statuss").getValue()
			});
});
</script>